package com.chinasoft.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Auther:hotfox2008
 * @Date:2024/6/28
 * @Description:com.chinasoft.controller
 * @version:1.0
 */
//控制器：IndexController
@Controller
public class IndexController{
/*    @Override
    // extends AbstractController
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        System.out.println("Hello,SpringMVC!");
        return new ModelAndView("index");
    }*/
    @RequestMapping("/index.html")
    public String index(){
        System.out.println("Hello,SpringMVC!");
        return "index";
    }
}
